package com.tanglinkai.mall.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tanglinkai.mall.entity.po.Category;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface CategoryMapper extends BaseMapper<Category> {
    @Insert("INSERT INTO wn_category(name) VALUES(#{name})")
    int insert(Category category);

    @Select("SELECT * FROM wn_category")
    List<Category> selectAll();
}
